<h1>Listing posts</h1>

<table>
  <tr>
    <th>Content</th>
    <th>Floor</th>
    <th>Topic</th>
    <th>Person</th>
  </tr>

<% @posts.each do |post| %>
  <tr>
    <td><%=h post.content %></td>
    <td><%=h post.floor %></td>
    <td><%=h post.topic_id %></td>
    <td><%=h post.person_id %></td>
    <td><%= link_to 'Show', post %></td>
    <td><%= link_to 'Edit', edit_post_path(post) %></td>
    <td><%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New post', new_post_path %>